﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AutoFlatnessTest
{
    public class DotData
    {
        public int? Yz1 { get; set; }
        public int? Smi1 { get; set; }
        public int? Yz2 { get; set; }
        public int? Smi2 { get; set; }
        public int? Yz3 { get; set; }
        public int? Smi3 { get; set; }
        public int? Yz4 { get; set; }
        public int? Smi4 { get; set; }
        public int? Yz5 { get; set; }
        public int? Smi5 { get; set; }
        public int? Ydjl { get; set; }

        public static DotData GetDotData()
        {
            return JsonConvert.DeserializeObject<DotData>(File.ReadAllText(LocalFile.DotPath));
        }

        public bool SaveData()
        {
            string js = JsonConvert.SerializeObject(this);
            File.WriteAllText(LocalFile.DotPath, js);
            return true;
        }

    }
}
